package com.kin.dao;

import com.kin.pojo.User_Permission;
import com.kin.pojo.User_PermissionExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface User_PermissionMapper {
    int countByExample(User_PermissionExample example);

    int deleteByExample(User_PermissionExample example);

    int deleteByPrimaryKey(Integer perid);

    int insert(User_Permission record);
    
    int insertUserPermission(@Param("userid")int userid,@Param("pageid")int pageid,@Param("state")int state);

    int insertSelective(User_Permission record);

    List<User_Permission> selectByExample(User_PermissionExample example);

    User_Permission selectByPrimaryKey(Integer perid);
    
    User_Permission selectByUserid(@Param("userid") Integer userid,@Param("pageid")Integer pageid);

    int updateByExampleSelective(@Param("record") User_Permission record, @Param("example") User_PermissionExample example);

    int updateByExample(@Param("record") User_Permission record, @Param("example") User_PermissionExample example);

    int updateByPrimaryKeySelective(User_Permission record);

    int updateByPrimaryKey(User_Permission record);
    
    /**
     * 根据用户id更新私有权限
     * @param userid
     * @param state
     * @return
     */
    int updateByUserId(@Param("userid")Integer userid,@Param("pageid") Integer pageid,@Param("state")Integer state);
}